package com.breakfast.fun.ui.user.recharge.rechargerecord;

import android.widget.ListView;

import com.breakfast.fun.R;
import com.breakfast.fun.adapter.user.RechargeRecordAdapter;
import com.breakfast.fun.base.BaseActivity;
import com.breakfast.fun.data.entity.user.recharge.RechargeRecord;
import com.breakfast.fun.view.widget.TitleBarView;

import butterknife.Bind;

public class RechargeRecordActivity extends BaseActivity<RechargeRecordPresenter, RechargeRecordModel> implements RechargeRecordContract.View {


    @Bind(R.id.tbv_recharge_record)
    TitleBarView mTbvRechargeRecord;
    @Bind(R.id.lv_recharge_record)
    ListView mLvRechargeRecord;

    private RechargeRecordAdapter mAdapter;

    @Override
    public int getLayoutId() {
        return R.layout.activity_recharge_record;
    }

    @Override
    public void initView() {
        mTbvRechargeRecord.setTitleNoRight("充值记录");
        mTbvRechargeRecord.setBack(this);


    }

    @Override
    public void showRecord(RechargeRecord record) {
        mAdapter = new RechargeRecordAdapter(context, record.getData());
        mLvRechargeRecord.setAdapter(mAdapter);
    }

}
